package com.pixiv.MysqlDAO;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.io.InputStream;

public class CommonDAO {

    static SqlSessionFactory Factory;
    static{
        String resource = "sql_pixivdata.xml";
        InputStream inputStream = null;
        try {
            inputStream = Resources.getResourceAsStream(resource);
            SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
            Factory = sqlSessionFactory;

        } catch (IOException e) {
            e.printStackTrace();
        }


    }
}
